package com.xpec.net.xnetty;

import org.jboss.netty.channel.ChannelFuture;

import com.xpec.net.NetFuture;

public class XNetFuture extends NetFuture{

	/**
	 * Netty 使用的 Future
	 */
	private ChannelFuture future = null;
	
	public XNetFuture(ChannelFuture f){
		this.future = f;
	}
	
	public ChannelFuture getFuture() {
		return future;
	}
	public void setFuture(ChannelFuture future) {
		this.future = future;
	}

	@Override
	public boolean isDone() {
		return future.isDone();
	}

	@Override
	public boolean isSuccess() {
		return future.isSuccess();
	}

	@Override
	public boolean isCancelled() {
		return future.isCancelled();
	}

	@Override
	public Throwable getCause() {
		return future.getCause();
	}

	@Override
	public boolean cancel() {
		return future.cancel();
	}

}
